import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const ORDER: AppRouteRecordRaw = {
    path: '/',
    name: 'o',
    component: DEFAULT_LAYOUT,
    meta: {
        locale: 'menu.order',
        requiresAuth: true,
        icon: 'icon-bookmark',
        order: 10,
    },
    children: [
        

        {
            path: 'store/order',
            name: 'OrderIndex',
            component: () => import('@/views/store/order.vue'),
            meta: {
                locale: 'menu.store.order',
                requiresAuth: true,
                roles: ['*'],
                icon: 'icon-drag-dot',
            },
        },
        {
            path: 'store/pickUp',
            name: 'OrderPickUp',
            component: () => import('@/views/store/pickup.vue'),
            meta: {
                locale: 'menu.store.pickup',
                requiresAuth: true,
                roles: ['*'],
                icon: 'icon-drag-dot',
            },
        },
        {
            path: 'store/send',
            name: 'OrderSend',
            component: () => import('@/views/store/send.vue'),
            meta: {
                locale: 'menu.store.send',
                requiresAuth: true,
                roles: ['*'],
                icon: 'icon-drag-dot',
            },
        },
        {
            path: 'biz/order',
            name: 'BizOrder',
            component: () => import('@/views/biz/order.vue'),
            meta: {
                locale: 'menu.biz.order',
                requiresAuth: true,
                roles: ['*'],
                icon: 'icon-drag-dot',
            },
        },
        
        // ==================== 商家相关路由 ====================
        {
            path: 'biz/record',
            name: 'BizRecord',
            component: () => import('@/views/biz/record.vue'),
            meta: {
                locale: 'menu.biz.record',
                requiresAuth: true,
                roles: ['*'],
                icon: 'icon-file',
            },
        },
        {
            path: 'biz/ticket',
            name: 'BizTicket',
            component: () => import('@/views/biz/ticket.vue'),
            meta: {
                locale: 'menu.biz.ticket',
                requiresAuth: true,
                roles: ['*'],
                icon: 'icon-check-square',
            },
        },
    ],
};

export default ORDER;
